//
//  CCClippingSkeletalSprite.h
//  BattleEmpireTest
//
//  Created by droidhang on 13-7-2.
//
//

#ifndef __BattleEmpireTest__CCClippingSkeletalSprite__
#define __BattleEmpireTest__CCClippingSkeletalSprite__

#include "CCSkeletalSprite.h"



class CCClippingSkeletalSprite : public CCSkeletalSprite {
    
public:
    virtual ~CCClippingSkeletalSprite();
    
    //vt: 1 means need clipping, 0 means don't need
    static CCClippingSkeletalSprite* create(const char* key, ClippingNode* clipper,const vector<bool>& bvt,Sprite* sprtAntialias=NULL);
    
    static CCClippingSkeletalSprite* create(CCSkeleton* s, ClippingNode* clipper,const vector<bool>& bvt,Sprite* sprtAntialias=NULL);
    
    bool init(ClippingNode* clipper,const vector<bool>& bvt,Sprite* sprtAntialias=NULL);
    
    virtual void visit();
    
    virtual void createSprites(Sprite* sprite,bool &lastAdditive,bool &nowAdditive);
    
    virtual void setShaderProgram(GLProgram* pShaderProgram);
    
protected:
    CCClippingSkeletalSprite();
    
    vector<bool> _bvt;
    vector<bool>::iterator _iter;
    
    Sprite* _sprtAntialias;
};



#endif /* defined(__BattleEmpireTest__CCClippingSkeletalSprite__) */
